
TARGET = event

CC = gcc
RM = rm -rf

CFLAGS += -std=c99 -Wall
LDFLAGS += -lSDL2 -lSDL2_image

SRC = $(wildcard *.c)
OBJS = $(patsubst %.c, %.o, $(SRC))

all: $(TARGET)

$(TARGET): $(OBJS)
	$(CC) -o $@ $^ $(LDFLAGS)

%.o: %.c
	$(CC) -o $@ $(CFLAGS) -c $^


clean:
	$(RM) $(TARGET) $(OBJS)

run: $(TARGET)
	./$^

.PHONY: clean run
